package com.xiaoshuidi.cloud.module.finance.controller.admin.finance.vo.transfer;

import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.annotation.ExcelProperty;
import com.xiaoshuidi.cloud.module.finance.enums.finance.SourceBizTypeEnum;
import com.xiaoshuidi.cloud.module.finance.enums.order.FinanceCommonStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class FinanceBankTransferPayMentExcelVO {

    /**
     * 收款账号
     */
    @Schema(description = "收款账号")
    @ExcelProperty(value = "收款账号")
    private String payeeBankAccount;

    /**
     * 收款户名
     */
    @Schema(description = "收款户名")
    @ExcelProperty(value = "收款户名")
    private String payeeName;

    /**
     * 收款行号
     */
    @Schema(description = "收款行号")
    @ExcelProperty(value = "收款行号")
    private String payeeBankCode;


    @Schema(description = "收款行名")
    @ExcelProperty(value = "收款行名")
    private String payeeBankBranch;

    /**
     * 跨行标识
     * 0徽商银行 1其他
     */
    @Schema(description = "跨行标识")
    @ExcelProperty(value = "跨行标识")
    private String isEnjambment;

    /**
     * 金额
     */
    @Schema(description = "金额")
    @ExcelProperty(value = "金额")
    private BigDecimal payAmount;

    /**
     * 收款人通知
     */
    @Schema(description = "收款人通知")
    @ExcelProperty(value = "收款人通知")
    private String payeeMobile;

    /**
     * 用途
     */
    @Schema(description = "用途")
    @ExcelProperty(value = "用途")
    private String bizTypeDesc;

    /**
     * 附言
     */
    @Schema(description = "附言")
    @ExcelProperty(value = "附言")
    private String reason;


    public static String getIsEnjambment(String name) {
        if (StrUtil.isNotEmpty(name) && name.contains("徽商")) {
            return "0";
        }
        return "1";
    }


}
